Fault tolerant memory

ABSTRACT

A computer system includes memory modules, a central processing unit and a memory controller. The memory controller is configured to access the memory modules in response to interaction with the central processing unit and define a fault tolerant memory array with the memory modules. Each memory module stores first data represented by second data stored by the other memory modules.

BACKGROUND

[0001] The invention relates to a fault tolerant memory.

[0002] Referring to FIG. 1, to service its storage needs, a file server 2 typically requires several (e.g., 5) disk drives 4. To improve the rate at which a file server 2 stores and retrieves data from disk drives 4, quite often, the drives 4 are arranged in a data storage array so that chunks of the data are spread across all of the drives 4. Thus, when organized as an array, the drives 4 effectively become one logical disk drive. In this manner, all reads and writes of data simultaneously use all of the drives 4. As a result, data transfer time between the server 2 and the disk drives 4 is reduced.

[0003] Unfortunately, the additional performance gained from the array of drives 4 does not come without a cost. Each additional drive added to the server 2 increases the likelihood that one of the drives 4 will fail and data will be lost. To improve the data storage integrity of the drives 4, data is quite often stored on the drives 4 in a fault tolerant scheme so that data from a failed drive can be recovered by using data from the others drives of the array.

[0004] Several common fault tolerant schemes that are used with drive arrays fall into a general drive array organizational scheme known as a Redundant Array of Inexpensive Disks (RAID). A particular drive array might be organized under one of several RAID types, or RAID levels. In a level one RAID array, data is mirrored, or shadowed, in redundant drives. Thus, for example, to store data in the array, the data is stored across two of the drives 4, and, simultaneously, a copy of this data is stored across two other drives 4 that serve as mirror drives. Thus, the data on the mirror drives duplicates the data on the main drives, and if one of the drives should fail, the data on the failed drive can be recovered from the duplicate drive.

[0005] A drive array may use a parity-based RAID scheme. In this scheme, the data is distributed in chunks across the array along with a parity chunk that is generated from the data. This parity chunk is used to recover data should a drive of the array fail.

[0006] For example, referring to FIG. 2, in a level four RAID array, data is distributed in a stripe 6 across the array. In this manner, each stripe 6 is subdivided into five chunks, or blocks 7, and each block 7 is stored on one or more drives 4 of the array. Thus, a level four RAID array requires at least five disk drives 4. One of the blocks 7 (e.g., block 7 a) is a parity block. This parity block is essentially the additional, redundant data used as an aid in recovering data from a failed drive 4. In a level four RAID array, the parity block 7 is stored on one or more parity dedicated drives 4 of the array. In the most basic level four RAID scheme, each of the different blocks 7 is stored on one of five of the different drives 4.

[0007] The parity data stored in the parity block 7 a is derived from the other blocks 7 b, 7 c, 7 d and 7 e. The parity block 7 a typically is formed by includes performing an exclusive OR (XOR) of the blocks 7 b, 7 c, 7 d and 7 e. As a result of this scheme, if any one of the blocks 7 a, 7 b, 7 c, 7 d and 7 e is lost due to a failed drive, the block may be recovered by XORing the remaining blocks together.

[0008] The server must update the parity block 7 a each time the server 2 updates a block 7 of the stripe 6. However, the server 2 does not have to read all five blocks 7 (i.e., one stripe 6) from the array to recalculate the parity block 7 a each time one of the blocks 7 is updated. Instead, to write one block to the array, the server 2 only needs to read the block 7 to be updated (i.e., the old data block) and read the parity block 7 a (i.e., the old parity block). Due to the nature of the XOR arithmetic, the new parity block 7 a is calculated by XORing the old parity block with both the old data block and the new block of data to be written to the array.

[0009] Other RAID levels are also commonly used. These levels include level five RAID which is similar to level four RAID, except that the parity blocks are distributed across all five drives, instead of just being located on one dedicated drive.

SUMMARY

[0010] In general, in one aspect, the invention features a computer system that includes memory units, a central processing unit and a memory controller. The memory controller is configured to access the memory untis in response to interaction with the central processing unit and define a fault tolerant memory array with the memory units. Each memory unit stores first data represented by second data stored by the other memory units.

[0011] Advantages of the invention may include one or more of the following. Multiple memory failures are tolerated. Memory uncorrectable by ECC code can be corrected. System crashes are prevented. Memory modules may be “hot swapped.”Memory down times are reduced. Memory may be expanded or reduced while the system remains powered up.

[0012] Implementations of the invention may include one or more of the following. The first data may include a mirror image of the second data. The fault tolerant array may include a RAID-type array. The controller may also be configured to use the second data to restore the first data. This restoration may include exclusive ORing the second data together. The first and second data may include a stripe of data that is stored in all of the memory units (e.g., memory modules such as DIMMs, SIMMs or RIMMs). The stripe may have contiguous blocks of data, and the first data may include a portion of one of the blocks.

[0013] In general, in another aspect, the invention features a computer system that includes a central processing unit, memory chips and a memory controller. The central processing unit is configured to generate data. The memory controller is configured to store the data in the memory chips, define a fault tolerant array with the memory chips, and use the fault tolerant array to restore the data.

[0014] Implementations of the invention may include one or more of the following. The memory controller may also be configured to generate correction code for correcting corruption in the data, store the correction code in the memory chips, use the correction code to correct corruption in the data when the corruption is correctable, and use the fault tolerant array to restore the data and corruption code when the corruption is not correctable.

[0015] In general, in another aspect, the invention features a computer system that includes a central processing unit, a slot connector and memory. The memory includes a first memory module that is inserted in the slot connector, and the first memory module stores data. The memory controller is configured to use the memory to restore the data on a second memory module that replaces the first memory module.

[0016] Implementations of the invention may include one or more of the following. The memory may include additional memory modules, and the memory controller may also be configured to define a fault tolerant array with the memory modules. The slot connector may include a hot plug slot connector.

[0017] In general, in another aspect, the invention features a method for use with a computer system that has memory units. The method includes defining a fault tolerant memory array with the memory units. Each memory unit stores first data represented by second data stored by the other memory units.

[0018] In general, in another aspect, the invention features a method for use with a computer system that has memory chips. The method includes storing data in the memory chips, defining a fault tolerant array with the memory chips, and using the fault tolerant array to restore the data.

[0019] In general, in another aspect, the invention features a method for use with a computer system that has memory. The memory includes a first memory module that is inserted in the slot connector. The first memory module stores data. The method includes using the memory to restore the data on a second memory module that replaces the first memory module.

[0020] Other advantages and features will become apparent from the following description and from the claims.

DESCRIPTION

[0021]FIG. 1 is a schematic diagram of a computer system.

[0022]FIG. 2 is a schematic representation of a stripe of data.

[0023]FIG. 3 is a schematic diagram of another computer system.

[0024]FIG. 3A is a schematic representation of a stripe of data.

[0025]FIGS. 4, 5 and 6 are schematic representations of the storage of data in disk drives.

[0026]FIG. 7 is a schematic diagram of the memory controller of the computer system of FIG. 3.

[0027]FIG. 8 is a schematic diagram of data buffer logic.

[0028]FIG. 9 is a schematic diagram of error code correction circuitry.

[0029] Referring to FIG. 3, a computer system 10 has memory modules 14 that form a system memory 11. Data is stored in and retrieved from the memory 11 by a memory controller 12 which directly accesses the memory 11 and serves as an interface between the rest of the system 10 and the system memory 11.

[0030] To store or retrieve data from the memory 11, the memory controller 12 is constructed to simultaneously access more than one removable, memory module 14 (e.g., memory modules 14 ₁, 14 ₂. . . 14 _(N)) of the memory 11. In this manner, the memory controller 12 is constructed to simultaneously distribute blocks, or chunks, of data across several of the memory modules 14. As a result of this arrangement, memory access times are minimized due to the parallel transfers of data to†from the memory modules 14. The memory modules 14 may be, for example, SIMMs or DIMMS.

[0031] To accomplish these features, the memory controller 12 divides the collective physical address space of the memory modules 14 into stripe regions for storing stripes of data 15 (see FIG. 3A). Each stripe 15 represents a contiguous (as seen by software) block of data that is transferred to/from several of the memory modules 14 in one operation. In this manner, each stripe region is mapped into the address spaces of several of the memory modules 14.

[0032] The memory controller 12 accesses several of the memory modules 14 at once. Thus, the bandwidth of data transfers to/from the memory 11 is equal to the combined bandwidths of the memory modules 14 that are accessed.

[0033] Although other stripe sizes are possible, in the arrangements discussed below, each stripe 15 is divided into five blocks 17 (Block0, Block1, Block2, Block3 and Block4) that have a uniform, predetermined size. The size of the blocks 17 may vary, for example, from thirty-two bytes to two kilobytes, depending on the application being executed by the computer system. The size is also dependent on a cacheline size, as discussed below.

[0034] Thus, the data striping reduces memory access times. However, the more memory modules, the more likely one of the memory modules will fail. To protect the data integrity of the memory 11, a redundant, fault tolerant scheme is used. In some arrangements, this fault tolerant scheme is a RAID scheme. For example, in one arrangement (see FIG. 4), the memory controller 12 uses a level one, or mirroring RAID scheme. In this scheme, the memory controller 12 converts divides the collective physical address space of the memory 11 into a data memory bank 30 a and a redundant, logical mirror memory bank 30 b.

[0035] The memory controller 12 is constructed to store all data in the data memory bank 30 a and simultaneously store a copy of this data in the mirror memory bank 30 b. Each bank 30 includes the same number of multiple memory modules 14. For example, in some arrangements, each bank includes two memory modules 14.

[0036] Referring to FIG. 5, in other arrangements, the memory controller 12 divides the collective physical address space of the memory 11 into five memory banks 31 (e.g., memory bank 31 a, 31 b, 31 c, 31 d and 31 e) and implements a level four RAID scheme. In this scheme, each stripe 17 (e.g., Block0, Block1, Block2, Block 3 and Block 4 belong to one stripe and Block4, BlockS, Block6 and Block7 belong to another stripe) is written across all five memory banks 31.

[0037] In the level four RAID scheme, one of the memory banks 31 (e.g., memory bank 31 a) is dedicated to store all of the parity blocks of the stripes 15, and four of the memory banks 31 (e.g., memory banks 31 b, 31 c, 31 d and 31 e) are dedicated to store the data blocks of the stripes 15. Each bank 31 includes the same multiple number of memory modules 14. For example, in some arrangements, each bank 31 includes two memory modules 14.

[0038] In another arrangement (see FIG. 6), the memory controller 12 implements a level five RAID scheme. The level five RAID scheme is similar to the level four RAID scheme except that instead of having dedicated banks for data blocks and parity blocks, the parity blocks are distributed across all five banks 31. To accomplish this, the parity block does not have a dedicated block position in the stripe, but instead, the position of the parity block is rotated from one stripe to the next.

[0039] The physical addressing performed by the memory controller 12 is transparent to devices of the computer system 10. Thus, the mapping of data into the striped regions in the memory 11 is performed by the memory controller 12. As a result, preexisting software of the system 10 does not need to be modified, as the memory 11 appears to be one logical unit.

[0040] Referring to FIG. 7, the memory controller 12 has a memory bus interface 42 that is constructed to encode and decode bus cycles on a memory bus 18 which extends to the memory modules 14. The memory bus 18 has a different set of data/error code correction (ECC) lines (e.g., sixty-four data lines and eight ECC lines) for each different memory bank.

[0041] Other lines of the memory bus 18 are unique to each memory bank. For example, a unique set of command, chip select, clock enable and clock lines are provided to each memory bank. In other arrangements, these lines are shared by all memory banks.

[0042] Memory module select lines (to activate a particular memory module) are used to select which memory modules are active. For example, the bank may have two memory modules, and only one memory module is active at a particular time.

[0043] The memory banks share other sets of common lines of the bus 18. For example, the memory banks share a common set of PAS# lines, CASE lines, address lines, bank select lines, and write enable lines.

[0044] The memory controller 12 has a local bus interface 40 that is constructed to encode and decode bus cycles on a local bus 21 and a Peripheral Component Interconnect (PCI) bus interface 44 that is constructed to encode and decode bus cycles on a PCI bus 23. Both the local bus interface 40 and the PCI bus interface 44 are coupled to each other and to the memory bus interface 42.

[0045] Central control logic 50 of the controller 12 uses the interfaces 40, 42 and 44 to transfer data between the local 21, PCI 23 and memory 18 buses. In this manner, the memory controller 12 serves also as a bridge between the local bus 21 and the PCI bus 23.

[0046] As discussed below, the memory bus interface 42 has data buffer logic 52 that uses error code correction (ECC) techniques to correct minor errors in data read from the memory modules 14. The data buffer logic 52 also generates ECC information which is stored along with all data stored in the memory modules 14. For sixty-four bits of data, the ECC code includes, for example, eight bits of ECC information.

[0047] When data is retrieved from the memory 11, the data buffer logic 52 analyzes the ECC information associated with that data to determine if the data is corrupted. If so, the data buffer logic 52 determines whether the data is correctable with the ECC information. If so, the data buffer logic 52 corrects the data.

[0048] In typical computer systems that use ECC memory, if the data is uncorrectable by using ECC code, a non-maskable interrupt (NMI) is generated which typically crashes the system. However, the system 10 has a fault tolerant memory 11 that corrects corrupted data that cannot be corrected by the ECC information. In this manner, if the data buffer logic 52 determines the data is not correctable with the ECC information, the logic 52 generates a maskable interrupt (i.e., not an NMI), and the redundant, fault tolerant scheme used by the memory subsystem 11 is used to restore the block 17 of data that contains the ECC uncorrectable data.

[0049] This restoration is performed by the memory controller 12, and is, in some arrangements, a background task. The memory controller 12 restores the data in the block 17 that is defective by XORing the other blocks of the same stripe together to generate a replacement block. The memory controller 12 completes the restoration by writing the replacement block to the memory 11.

[0050] The fault tolerant scheme may also be used by the memory controller 12 to restore data on an entire memory module 14. To accomplish this, the memory controller 12 restores each block 17 on the module 14 by XORing together blocks from the other memory modules 14. Thus, defective memory modules 14 can be “hot swapped” with replacement memory modules without turning off power to or crashing the system 10. The hot plugging of memory modules is further discussed in U.S. patent application Ser. No. ______, entitled, “Installation and Removal of Components of a Computer,” filed on Sep. 30, 1997, and hereby incorporated by reference.

[0051] Via the data buffer logic 52, the memory controller 12 can write a full stripe (i.e., a stripe with all of the blocks) to the memory banks using parallel write operations on the memory bus 18. In this manner, the data buffer logic 52 computes the parity information of the stripe, and then, without needing to retrieve the old stripe data from the memory 11, the data buffer logic 52 writes the new, full stripe to the memory 11.

[0052] Unlike full stripe writes, partial stripe writes, i.e., stripes that require the memory controller 12 to write less than a full stripe (e.g., only two or three blocks of the stripe) to the memory 11, introduce more overhead. For example, without the features of the controller 12 discussed below, in order to write a partial stripe, the controller 12 would always generate four separate memory requests for each partial stripe write: one request to read the parity information, one request to read the old data stored in the memory, one request to write the new data and one request to write the new parity. Because the blocks are accessed in parallel, the above steps occur in two operations across the memory bus 18.

[0053] To reduce the number of required operations for partial stripe write operations, the data buffer logic 52 has a cache 48 which is configured to capture blocks of data and parity read from the stripe. Thus, the size of cachelines of the cache 48, in some arrangements, is equal to the block size of the stripe. If the old data for computing the parity of the stripe is already in the cache 48, then the number of required memory accesses is reduced from four to three. If the old parity is in the cache 48, then the number of required memory accesses can be reduced from three to two. Because the old data and the old parity are read in parallel, the partial stripe write consumes no more transfer time than a full stripe write.

[0054] To improve the data processing speed of the memory controller 12, the data buffer interface 52 also has a posted memory write (PMW) buffer 49. When a central processing unit (CPU) 20, for example, writes data to the memory 11, the CPU 20 waits for an acknowledgement from the memory controller 12. Because the write of data to the memory 11 may include at least two memory operations (i.e., require two clock cycles), the CPU 20 may be delayed in waiting for the acknowledgement. To prevent this from occurring, the controller 12 has a posted memory write (PMW) buffer 49 which acknowledges the completion of a write of the data to the memory modules 14 even though the write is still pending.

[0055] A potential problem with the PMW buffer 49 is that once the write is acknowledged, the requesting device assumes the data is stored in memory and does not to store the data again. Thus, if the computer system 10 is reset, the data in the PMW buffer 49 may be lost. To prevent this from occurring, the PMW buffer 49 may include non-volatile memory which is not subject to power loss, or reset.

[0056] Because the buffer 49 is several entries deep, the buffer 49, in some arrangements, is used to collect partial stripes and when, possible, assemble the partial stripes into full stripes. In some arrangements, the size of the buffer 49 is sufficient to hold a backlog of write requests. In this manner, some of the stripe reads/writes are performed as background tasks. In some arrangements, the buffer 49 is a first-in-first-out (FIFO) buffer.

[0057] Besides the data buffer logic 48, the memory controller 12 also has memory address/control logic 56 that performs mapping of the memory 11 into the stripes and generates control signals to access the memory chips of the subsystem 11.

[0058] The memory controller 12 has also an XOR engine 60 that is coupled between the buffer 49 and data buffer logic 52 and used to compute parity information for each stripe. The XOR engine 60 also controls the storage and retrieval of data from the buffer 49. As stripe write requests are moved through the buffer 49, the XOR engine 60 attempts to combine the requests to form full stripes. For full stripes, the XOR engine 60 XORs all blocks of the stripe to form the parity block. For partial stripes, the XOR engine 60 reads the old blocks of parity and data from the memory 11 and uses this to form the new parity block.

[0059] To enhance its performance, the XOR engine 60 has the cache 48 which the XOR engine 60 uses to trap old data reads and recently written parity.

[0060] Referring to FIG. 8, the data buffer logic 52 has ECC units 70 (i.e., ECC units 70 a, 70 b, 70 c and 70 d). Each different ECC unit 70 handles the generation of ECC bits and the correction of data for a different memory bank. For the case of on memory module per memory bank, each ECC unit 70 processes sixty-four bits of data and the associated ECC code (e.g., eight bits of ECC code). Two hundred fifty-six bits are used for data bits and sixty-four bits are used for parity bits for the fault tolerant array.

[0061] Referring to FIG. 9, each ECC unit 70 includes an ECC checker 72 that uses the ECC code to detect data corruption in the associated sixty-four bits of data and the ECC code. If the data/ECC code is correctable, the ECC unit 70 asserts a correctable error signal called ECC_CERR and corrects the corrupted data/ECC code. If the data/ECC code is uncorrectable, the ECC checker 72 asserts an uncorrectable error signal called ECC_UNCERR which causes the generation of a maskable interrupt (i.e., does not cause the generation of an NMI). A FIFO buffer 76 temporarily stores data as the data is read into the data buffer interface 52. Although the FIFO buffer 76 may have one of many different sizes, the size of the FIFO buffer 76, in some arrangements, is equal to the cacheline size of the CPU 20.

[0062] Each ECC unit 70 also includes an ECC generator 74 which generates an eight bit ECC code for each sixty-four bits written to the memory subsystem 11. The ECC unit 70 also has multiplexers 78 that are used to perform read-modify-write operations. This feature is used when less than all of the sixty-four bits are changed. Each multiplexer 78 is associated with a different byte of the sixty-four bits, or eight bytes. Thus, when a write needs to be performed to less than all eight bytes, all of the old eight bytes are first read from memory, the multiplexers 78 then select a combination of the new and old bytes to be written back to the memory.

[0063] Referring back to FIG. 3, the computer system 10 includes four central processing units (CPU)s that are connected to the local bus 21. The memory modules 14 are, in some arrangements, single in-line memory modules (SIMM)s, double in-line memory modules (DIMM)s and/or rambus in-line memory modules (RIMM)s, all of which contain memory chips mounted to a printed circuit board (PCB). A PCI-Industry Standard Architecture (PCI-ISA) bridge 90 interfaces the primary PCI bus 23 to an ISA bus 92, and a PCI-PCI bridge 91 interfaces the primary PCI bus 23 to a secondary PCI bus 93.

[0064] An input/output (I/O) controller 99 and an Intelligent Electronic Device (IDE) controller 101 are coupled to the ISA bus 92. The I/O controller 99 receives inputs from a mouse 98 and keyboard 100. The I/O controller 99 also controls operation of a floppy disk drive 103. The IDE controller 101 controls operation of a CD-ROM drive 102.

[0065] A disk drive controller 94 and a video controller 95 are coupled to the secondary PCI bus 93. The drive controller 94 controls operation of a disk array 97, and the video controller 95 drives a display 96.

[0066] Other embodiments are within the scope of the following claims. For example, the memory may be organized in other fault tolerant schemes, such as a level three or a level six RAID scheme. 

What is claimed is:
 1. A computer system comprising: memory units; a central processing unit; and a memory controller configured to access the memory units in response to interaction with the central processing unit and define a fault tolerant memory array with the memory units, each memory unit storing first data represented by second data stored by the other memory units.
 2. The computer system of claim 1, wherein the first data comprises a mirror image of the second data.
 3. The computer system of claim 1, wherein the fault tolerant array comprises a RAID-type array.
 4. The computer system of claim 1, wherein the controller is further configured to use the second data to restore the first data.
 5. The computer system of claim 4, wherein the use of the second data to restore includes exclusive ORing the second data together.
 6. The computer system of claim 1, wherein the first and second data comprise a stripe of data stored in all of the memory units.
 7. The computer system of claim 6, wherein the stripe has contiguous blocks of data, and the first data comprises a portion of one of the blocks.
 8. The computer system of claim 1, wherein the memory units comprise at least one SIMM.
 9. The computer system of claim 1, wherein the memory units comprise at least one DIMM.
 10. The computer system of claim 1, wherein the memory units comprise at least one RIMM.
 11. The computer system of claim 1, wherein the memory units comprise at least one memory module.
 12. A computer system comprising: a central processing unit configured to generate data; memory chips; and a memory controller configured to store the data in the memory chips, define a fault tolerant array with the memory chips, and use the fault tolerant array to restore the data.
 13. The computer system of claim 12, wherein the memory controller is further configured to: generate correction code for correcting corruption in the data, store the correction code in the memory chips, use the correction code to correct corruption in the data when the corruption is correctable, and use the fault tolerant array to restore the data and corruption code when the corruption is not correctable.
 14. A computer system comprising: a central processing unit; a slot connector; memory, the memory including a first memory module inserted in the slot connector, the first memory module storing data; and a memory controller configured to: use the memory to restore the data on a second memory module that replaces the first memory module.
 15. The computer system of claim 14, wherein the memory comprises additional memory modules.
 16. The computer system of claim 14, wherein the memory controller is further configured to define a fault tolerant array with the memory modules.
 17. The computer system of claim 14, wherein the slot connector comprises a hot plug slot connector.
 18. A method for use with a computer system having memory units, comprising: defining a fault tolerant memory array with the memory units, each memory unit storing first data represented by second data stored by the other memory untis.
 19. The method of claim 18, wherein the first data comprises a mirror image of the second data.
 20. The method of claim 18, wherein the fault tolerant array comprises a RAID-type array.
 21. The method of claim 18, further comprising: using the second data to restore the first data.
 22. The method of claim 21, wherein the use of the second data to restore includes exclusive ORing the second data together.
 23. The method of claim 18, wherein the first and second data comprise a stripe of data stored in all of the memory units. 24 The method of claim 23, wherein the stripe has contiguous blocks of data, and the first data comprises a portion of one of the blocks.
 25. The method of claim 18, wherein the memory units comprise at least one SIMM.
 26. The method of claim 18, wherein the memory units comprise at least one DIMM.
 27. The method of claim 18, wherein the memory units comprise at least one RIMM.
 28. The method of claim 18, wherein the memory units comprise at least one memory module.
 29. The method of claim 18, wherein the memory units comprise at least one memory chip.
 30. A method for use with a computer system having memory chips, comprising: storing data in the memory chips; defining a fault tolerant array with the memory chips; and using the fault tolerant array to restore the data.
 31. The method of claim 30, further comprising: generating correction code for correcting corruption in the data; storing the correction code in the memory chips; using the correction code to correct corruption in the data when the corruption is correctable; and using the fault tolerant array to restore the data and corruption code when the corruption is not correctable.
 32. A method for use with a computer system having memory, the memory including a first memory module inserted in the slot connector, the first memory module storing data, comprising: using the memory to restore the data on a second memory module that replaces the first memory module.
 33. The method of claim 32, wherein the memory comprises additional memory modules.
 34. The method of claim 32, further comprising: defining a fault tolerant array with the memory modules.
 35. The method of claim 32, wherein the slot connector comprises a hot plug slot connector. 